<?php
/**********************************************************
  eCode Marketing System
  Version 0.1
  Administration Menu (/admin/index.php)
**********************************************************/

// Require configuration
define("FROMSCRIPT", true);
require dirname(__FILE__) . "/../config.php";


// Start session if not already started
session_start();

if(!isset($_SESSION['login_t'])) {

	/* If we're not logged in, take us to the login page and
	ensure the rest of the code isn't run */

	header("Location: /admin/login.php");
	exit;
}

$pagetitle = "Main Menu (Admin)";
$pageheading = SITE_NAME . " Administration";
$page_content = "<hr />\n";
$page_content .= "<div class=\"flexpander\">Campaign Functions <span>(click to expand/collapse)</span></div>\n";
$page_content .= "<div class=\"flexpanded\">\n";
$page_content .= "<ul>\n";
$page_content .= "<li><a href=\"/admin/campaign_add.php\">Add Campaign</a></li>\n";
$page_content .= "<li><a href=\"/admin/list_campaigns.php\">List Campaigns</a></li>\n";
$page_content .= "</ul>\n";
$page_content .= "</div>\n";
$page_content .= "<div class=\"flexpander\">Offer Functions <span>(click to expand/collapse)</span></div>\n";
$page_content .= "<div class=\"flexpanded\">\n";
$page_content .= "<ul>\n";
$page_content .= "<li><a href=\"/admin/offer_add.php\">Add Offer</a></li>\n";
$page_content .= "</ul>\n";
$page_content .= "</div>\n";

// Require template
require TEMPLATE_DIR . "/index.php";
?>